<!DOCTYPE html>
<html lang="en" style="background:#fff;">
<head>
    <base href="${basePath}">
    <#include "common/top.html"/>
</head>
<body style="background:#fff;">
<form class="layui-form layui-form-pamel" name="form1" id="form1" method="post">
    <div class="searchbox demoTable" id="searchbox">
        <div class="layui-form-item">
                                                                                        <div class="layui-inline">
                        <label class="layui-form-label">主键：</label>
                        <div class="layui-input-inline">
                            <input class="layui-input" type="text" maxlength="50" name="fileid" id="fileid" placeholder="请输入主键"/>
                        </div>
                    </div>
                                                                                                        <div class="layui-inline">
                        <label class="layui-form-label">所属：</label>
                        <div class="layui-input-inline">
                            <input class="layui-input" type="text" maxlength="50" name="ownerid" id="ownerid" placeholder="请输入所属"/>
                        </div>
                    </div>
                                                                                                        <div class="layui-inline">
                        <label class="layui-form-label">名称：</label>
                        <div class="layui-input-inline">
                            <input class="layui-input" type="text" maxlength="50" name="filename" id="filename" placeholder="请输入名称"/>
                        </div>
                    </div>
                                                                                                        <div class="layui-inline">
                        <label class="layui-form-label">地址：</label>
                        <div class="layui-input-inline">
                            <input class="layui-input" type="text" maxlength="50" name="fileurl" id="fileurl" placeholder="请输入地址"/>
                        </div>
                    </div>
                                                                                                        <div class="layui-inline">
                        <label class="layui-form-label">属性：</label>
                        <div class="layui-input-inline">
                            <input class="layui-input" type="text" maxlength="50" name="filetype" id="filetype" placeholder="请输入属性"/>
                        </div>
                    </div>
                                        <input type="button" value="查询" onclick="$.table.search()" class="layui-btn layui-btn-red"/>
        </div>
    </div>
</form>

<div style="overflow:auto;width: 100%;padding-bottom: 20px;">
    <table id="simple-table" class="layui-table" lay-filter="simple-table">
    </table>
    <script type="text/html" id="barTable">
        <a class="layui-icon colored7764" lay-event="previewFlag" title="预览">预览</a>
        <a class="layui-icon colored7764" lay-event="editFlag" title="编辑">编辑</a>
        <a class="layui-icon colored7764" lay-event="delFlag" title="删除">删除</a>
    </script>

    <script type="text/html" id="toolbarTable">
        <div class="layui-inline" title="添加" lay-event="addFlag"><i class="layui-icon layui-icon-add-circle"></i></div>
        <div class="layui-inline" title="导出" lay-event="exportExcel"><i class="layui-icon layui-icon-export"></i></div>
    </script>
</div>

</body>
</html>

<script type="text/javascript">

    var prefix = basePath + "system/uploadfile";

    var options = {
        id: 'simple-table',
        url: prefix + '/uploadfilelistPage',
        javaField:'fileid',    //主键
        addUrl: prefix + '/addUploadfile',   //添加
        deleteUrl: prefix + '/deleteUploadfile',    //删除
        editUrl: prefix + '/toEditUploadfile?fileid=',   //编辑
        exportUrl: prefix + '/exportUploadfile',    //导出
        importTemplate: prefix + '/impTempUploadfile',   //下载导入模板
        importTemplateUrl: prefix + '/impTempUploadfileUrl',    //导入
        addFull: false, //弹出框最大化
        editFull: false, //弹出框最大化
        toolbar: '#toolbarTable',  //开启工具栏
        modalName:'上传文件',
        cols: [[
            {type:'numbers', title: '序号',width:50}
                                                            ,{field:'fileid', title: '主键'}
                                                            ,{field:'ownerid', title: '所属'}
                                                            ,{field:'filename', title: '名称'}
                                                            ,{field:'fileurl', title: '地址'}
                                                            ,{field:'filetype', title: '属性'}
                        ,{title: '操作' ,width:178, align:'center', toolbar: '#barTable'}
        ]],
        page: true
    };

    var init = $.table.init(options);

</script>
